package springtest.async.pojo;

/**
 * @author chenzhiqiang 2018-02-20 14:59:35
 */

public class Result {
	// 禁止进行指令重排序
	private volatile static Result result;

	public static Result getResult() {
		if (result == null) {
			// 确保只有一个线程初始化result
			synchronized (Result.class) {
				if (result == null) {
					result = new Result();
				}
			}
		}
		return result;
	}
}
